home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0218.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.1 KB  |  32 lines

  1. Why does anyone use assigns for their games/utils??  Why not just use
  2. relative dir names!  Like game.exe has folders data, gfx etc.  Game just
  3. calls data/... or gfx/...
  4.  
  5. Alternatives:
  6.  
  7. PROGDIR:   -- assigned to each executable when run
  8. Dir$       -- Current Dir in Amos
  9.  
  10. In C, you can even read argv[0] to get the Command in case they typed a
  11. path before the exe name  ie   hd1:games/mygame.exe
  12.  
  13. I have too many assigns!  And the DEFER option of Assign is no replacement!
  14. (although it's much help)
  15.  
  16. I can understand HELP: libs: dev: t: clip: s: (OS ones) and maybe even MUI:
  17.  
  18. But not each Util and Game!  When I move things on my HD, I usually just
  19. move the Prog's Dir or the Prog and all it's files.  I don't want to worry
  20. about re-assigning assigns!  Why would anyone want to move the executable
  21. somewhere strange, away from the data??  If so, use a CMD_LINE arg!
  22.  
  23. Also, a tip to check if an assign/device exists:
  24. ASSIGN devname: EXISTS >nil:
  25. if NOT WARN EQ 5
  26.  echo It is Here.
  27. endif
  28.  
  29. For instance I check if df1: exists, then addbuffers.  (for when I remove
  30. df1: temporarily, I hate getting errors!)
  31.  
  32.